import datetime
from django.template.loader import get_template
from django.shortcuts import render_to_response  #shorttest solution for return

def home_page(request):
    return render_to_response('link.html')

def hello(request):
    return HttpResponse("Hello world")


def hours_ahead(request, offset):
    try:
        offset = int(offset)
    except ValueError:
        raise Http404()
    dt = datetime.datetime.now() + datetime.timedelta(hours=offset)
    html = "<html><body>In %s hour(s), it will be %s.</body></html>" % (offset, dt)
    return HttpResponse(html)
